﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Index</title>
    <style>
        body
        {
            font-family:Calibri;
        }
        label
        {
            display:block;
            width:100px;
            float:left;
        }
        
        input
        {
            border:1px solid silver;
            font-size:larger;
        }
        
        .field-validation-error
        {
            display:block;
            padding-left:100px;
            color:Red;
        }
        
    </style>

    <script language="javascript">
        window.onload = function () {
            if (window.parent != null) {
                var w = window;
                var r = false;
                while (w != w.parent && w.parent != null) {
                    w = w.parent;
                    r = true;
                }

                if(r)
                    w.location.href = "<%=Url.Content("~/login")%>?expired=true";
            }
        }
    </script>

</head>
<body>
    <%using(Html.BeginForm()){ %>
    <div style="text-align:center;">
        <div style="margin:auto;border:1px solid gray;width:400px;text-align:left;padding:10px;">
            <h1>MethodWorx CMS - Login</h1>
            <h4><%=this.ViewData["message"] %></h4>
            <div style="padding:10px;">
                <label>Username:</label>
                <%=Html.TextBox("username") %>
                <br />
                <%=Html.ValidationMessage("username") %>
            </div>
            <div style="padding:10px;">
                <label>Password:</label>
                <%=Html.Password("password") %>
                <br />
                <%=Html.ValidationMessage("password") %>
            </div>
            <div style="padding:10px;">
                <button>Login</button>
            </div>
        </div>
    </div>
    <%} %>
</body>
</html>
